package com.jianggy.simplefactory;

/**
 * @author jianggy
 * @time 2018年9月5日 下午11:02:55
 * @description
 */
public class ConnectionFactory1 {
	public static <T extends DBConnection> T getInstance(Class<T> clazz) {
		T connection = null;
		try {
			connection = (T) Class.forName(clazz.getName()).newInstance();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return connection;
	}
}
